<template>
  <div class="container">
    <div class="card">
      <h1>欢迎使用腾讯云对象存储资源浏览器</h1>
      <p>这是一个简单的工具，可以帮助您浏览和管理腾讯云对象存储中的文件和文件夹。</p>
      
      <el-button type="primary" @click="goToRootFolder" class="mt-20">
        <el-icon><Folder /></el-icon>
        浏览根目录
      </el-button>
    </div>
    
    <div class="card">
      <h2>功能介绍</h2>
      <el-row :gutter="20" class="feature-list">
        <el-col :span="8">
          <div class="feature-item">
            <el-icon><FolderOpened /></el-icon>
            <h3>浏览文件和文件夹</h3>
            <p>轻松浏览腾讯云对象存储中的文件和文件夹结构</p>
          </div>
        </el-col>
        <el-col :span="8">
          <div class="feature-item">
            <el-icon><Edit /></el-icon>
            <h3>自定义昵称</h3>
            <p>为文件和文件夹添加自定义昵称，方便识别</p>
          </div>
        </el-col>
        <el-col :span="8">
          <div class="feature-item">
            <el-icon><Picture /></el-icon>
            <h3>缩略图预览</h3>
            <p>为视频和文件添加自定义缩略图</p>
          </div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { Folder, FolderOpened, Edit, Picture } from '@element-plus/icons-vue'

const router = useRouter()

const goToRootFolder = () => {
  router.push({ name: 'folder' })
}
</script>

<style scoped>
.mt-20 {
  margin-top: 20px;
}

.feature-list {
  margin-top: 20px;
}

.feature-item {
  text-align: center;
  padding: 20px;
  border-radius: 4px;
  background-color: #f8f9fa;
  height: 100%;
}

.feature-item .el-icon {
  font-size: 48px;
  color: #409EFF;
  margin-bottom: 10px;
}

.feature-item h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.feature-item p {
  color: #606266;
  font-size: 14px;
}
</style> 